// Copyright (c) Microsoft Corporation.  All rights reserved.

#pragma once

#include "DirectUnknown.h"
#include "DirectWrite/DWriteEnums.h"

namespace Microsoft { namespace WindowsAPICodePack { namespace DirectX { namespace WindowsImagingComponent {
    ref class WICBitmap;
    ref class BitmapSource;
}}}}

namespace  Microsoft { namespace WindowsAPICodePack { namespace DirectX { namespace DXGI {
    ref class Surface;
}}}}

namespace  Microsoft { namespace WindowsAPICodePack { namespace DirectX { namespace DirectWrite {
    ref class TextFormat;
    ref class TextLayout;
    ref class RenderingParams;
}}}}
using namespace System::Collections::ObjectModel;
using namespace Microsoft::WindowsAPICodePack::DirectX;
using namespace Microsoft::WindowsAPICodePack::DirectX::WindowsImagingComponent;
using namespace Microsoft::WindowsAPICodePack::DirectX::DirectWrite;
using namespace Microsoft::WindowsAPICodePack::DirectX::DXGI;

namespace Microsoft { namespace WindowsAPICodePack { namespace DirectX { namespace Direct2D1 {

    namespace D2D = Microsoft::WindowsAPICodePack::DirectX::Direct2D1;

/// <summary>
/// The root interface for all resources in D2D.
/// <para>(Also see DirectX SDK: ID2D1Resource)</para>
///</summary>
public ref class D2DResource : DirectUnknown 
{
public:

/// <summary>
/// Retrieve the factory associated with this resource.
/// <para>(Also see DirectX SDK: ID2D1Resource::GetFactory)</para>
/// </summary>
/// <returns>D2DFactory</returns>
D2DFactory ^
GetFactory(
    );

internal:

D2DResource();

D2DResource(
    IUnknown *pInner
    );

};

/// <summary>
/// Root bitmap resource, linearly scaled on a draw call.
/// <para>(Also see DirectX SDK: ID2D1Bitmap)</para>
///</summary>
public ref class D2DBitmap : D2DResource 
{
public:

/// <summary>
/// Returns the size of the bitmap in resolution independent units.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::GetSize)</para>
/// </summary>
/// <returns>SizeF</returns>
property SizeF Size
{
    SizeF get();
}

/// <summary>
/// Returns the size of the bitmap in resolution dependent units, (pixels).
/// <para>(Also see DirectX SDK: ID2D1Bitmap::GetPixelSize)</para>
/// </summary>
/// <returns>SizeU</returns>
property SizeU PixelSize
{
    SizeU get();
}


/// <summary>
/// Retrieve the format of the bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::GetPixelFormat)</para>
/// </summary>
/// <returns>PixelFormat</returns>
property D2D::PixelFormat PixelFormat
{
    D2D::PixelFormat get();
}

/// <summary>
/// Return the DPI of the bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::GetDpi)</para>
/// </summary>
/// <returns>The dpi.</returns>
property DpiF Dpi
{
    DpiF get();
}

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromBitmap)</para>
/// </summary>
/// <param name="destPoint">The destPoint parameter.</param>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="srcRect">The srcRect parameter.</param>
void
CopyFromBitmap(
    D2DBitmap ^ bitmap,
    Point2U destPoint,
    RectU srcRect
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromBitmap)</para>
/// </summary>
/// <param name="destPoint">The destPoint parameter.</param>
/// <param name="bitmap">The bitmap parameter.</param>
void
CopyFromBitmap(
    D2DBitmap ^ bitmap,
    Point2U destPoint
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="srcRect">The srcRect parameter.</param>
void
CopyFromBitmap(
    D2DBitmap ^ bitmap,
    RectU srcRect
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
void
CopyFromBitmap(
    D2DBitmap ^ bitmap
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromRenderTarget)</para>
/// </summary>
/// <param name="destPoint">The destPoint parameter.</param>
/// <param name="renderTarget">The renderTarget parameter.</param>
/// <param name="srcRect">The srcRect parameter.</param>
void
CopyFromRenderTarget(
    RenderTarget ^ renderTarget,
    Point2U destPoint,
    RectU srcRect
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromRenderTarget)</para>
/// </summary>
/// <param name="destPoint">The destPoint parameter.</param>
/// <param name="renderTarget">The renderTarget parameter.</param>
void
CopyFromRenderTarget(
    RenderTarget ^ renderTarget,
    Point2U destPoint
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromRenderTarget)</para>
/// </summary>
/// <param name="renderTarget">The renderTarget parameter.</param>
/// <param name="srcRect">The srcRect parameter.</param>
void
CopyFromRenderTarget(
    RenderTarget ^ renderTarget,
    RectU srcRect
    );

/// <summary>Copies the specified region from the specified render target into the current bitmap.
/// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromRenderTarget)</para>
/// </summary>
/// <param name="renderTarget">The renderTarget parameter.</param>
void
CopyFromRenderTarget(
    RenderTarget ^ renderTarget
    );


// TODO: Use stream to void*

///// <summary>Copies the specified region from memory into the current bitmap.
///// <para>(Also see DirectX SDK: ID2D1Bitmap::CopyFromMemory)</para>
///// </summary>
///// <param name="dstRect">The dstRect parameter.</param>
///// <param name="srcData">The srcData parameter.</param>
///// <param name="pitch">The pitch parameter.</param>
//void
//CopyFromMemory(
//    Nullable<RectU> % dstRect,
//    IntPtr srcData,
//    UINT32 pitch
//    );

internal:

D2DBitmap();

D2DBitmap(
    IUnknown *pInner
    );

};

/// <summary>
/// Represents an collection of gradient stops that can then be the source resource for
/// either a linear or radial gradient brush.
/// <para>(Also see DirectX SDK: ID2D1GradientStopCollection)</para>
///</summary>
public ref class GradientStopCollection : D2DResource 
{
public:

/// <summary>
/// Returns the number of stops in the gradient.
/// <para>(Also see DirectX SDK: ID2D1GradientStopCollection::GetGradientStopCount)</para>
/// </summary>
/// <returns>UINT32</returns>
property UINT32 GradientStopCount
{
    UINT32 get();
}

/// <summary>
/// Copies the gradient into a readonly collection.
/// <para>(Also see DirectX SDK: ID2D1GradientStopCollection::GetGradientStops)</para>
/// </summary>
/// <returns>A readonlyCollection of GradientStop.</returns>
ReadOnlyCollection<GradientStop>^
GetGradientStops(
    );

/// <summary>
/// Returns whether the interpolation occurs with 1.0 or 2.2 gamma.
/// <para>(Also see DirectX SDK: ID2D1GradientStopCollection::GetColorInterpolationGamma)</para>
/// </summary>
/// <returns>Gamma</returns>
property Gamma ColorInterpolationGamma
{
    Gamma get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GradientStopCollection::GetExtendMode)</para>
/// </summary>
/// <returns>ExtendMode</returns>
property D2D::ExtendMode ExtendMode
{
    D2D::ExtendMode get();
}

internal:

GradientStopCollection();

GradientStopCollection(
    IUnknown *pInner
    );

};

/// <summary>
/// The root brush interface. All brushes can be used to fill or pen a geometry.
/// <para>(Also see DirectX SDK: ID2D1Brush)</para>
///</summary>
public ref class Brush : D2DResource 
{
public:

/// <summary>
/// Gets or sets the opacity for when the brush is drawn over the entire fill of the brush.
/// <para>(Also see DirectX SDK: ID2D1Brush::SetOpacity)</para>
/// <para>(Also see DirectX SDK: ID2D1Brush::GetOpacity)</para>
/// </summary>
/// <param name="opacity">The opacity parameter.</param>
property FLOAT Opacity
{
    FLOAT get();
    void set(FLOAT);
}

/// <summary>
/// Gets or sets the transform that applies to everything drawn by the brush.
/// <para>(Also see DirectX SDK: ID2D1Brush::SetTransform)</para>
/// </summary>
/// <param name="transform">The transform parameter.</param>
property Matrix3x2F Transform
{
    Matrix3x2F get();
    void set(Matrix3x2F);
}

internal:

Brush();

Brush(
    IUnknown *pInner
    );

};

/// <summary>
/// A bitmap brush allows a bitmap to be used to fill a geometry.
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush)</para>
///</summary>
public ref class BitmapBrush : Brush 
{
public:

/// <summary>
/// Gets or sets how the bitmap is to be treated outside of its natural extent on the X axis.
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::GetExtendModeX)</para>
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::SetExtendModeX)</para>
/// </summary>
property D2D::ExtendMode ExtendModeX
{
    D2D::ExtendMode get();
    void set(D2D::ExtendMode);
}

/// <summary>
/// Gets or sets how the bitmap is to be treated outside of its natural extent on the Y axis.
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::GetExtendModeY)</para>
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::SetExtendModeY)</para>
/// </summary>
property D2D::ExtendMode ExtendModeY
{
    D2D::ExtendMode get();
    void set(D2D::ExtendMode);
}

/// <summary>
/// Sets the interpolation mode used when this brush is used.
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::GetInterpolationMode)</para>
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::SetInterpolationMode)</para>
/// </summary>
/// <param name="interpolationMode">The interpolationMode parameter.</param>
property BitmapInterpolationMode InterpolationMode
{
    BitmapInterpolationMode get();
    void set(BitmapInterpolationMode);
}
    
/// <summary>
/// Sets the bitmap associated as the source of this brush.
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::SetBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
void
SetBitmap(
    D2DBitmap ^ bitmap
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1BitmapBrush::GetBitmap)</para>
/// </summary>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
GetBitmap(
    );

internal:

BitmapBrush();

BitmapBrush(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SolidColorBrush)</para>
///</summary>
public ref class SolidColorBrush : Brush 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SolidColorBrush::GetColor)</para>
/// <para>(Also see DirectX SDK: ID2D1SolidColorBrush::SetColor)</para>
/// </summary>
/// <param name="color">The color parameter.</param>
property ColorF Color
{
    ColorF get();
    void set(ColorF);
}

internal:

SolidColorBrush();

SolidColorBrush(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1LinearGradientBrush)</para>
///</summary>
public ref class LinearGradientBrush : Brush 
{
public:

/// <summary>
/// Gets or sets the start point of the gradient in local coordinate space. 
/// <para>(Also see DirectX SDK: ID2D1LinearGradientBrush::GetStartPoint)</para>
/// <para>(Also see DirectX SDK: ID2D1LinearGradientBrush::SetStartPoint)</para>
/// </summary>
property Point2F StartPoint
{
    Point2F get();
    void set(Point2F);
}

/// <summary>
/// Gets or sets the end point of the gradient in local coordinate space. This is not influenced
/// by the geometry being filled.
/// <para>(Also see DirectX SDK: ID2D1LinearGradientBrush::GetEndPoint)</para>
/// <para>(Also see DirectX SDK: ID2D1LinearGradientBrush::SetEndPoint)</para>
/// </summary>
property Point2F EndPoint
{
    Point2F get();
    void set(Point2F);
}


/// <summary>
/// <para>(Also see DirectX SDK: ID2D1LinearGradientBrush::GetGradientStopCollection)</para>
/// </summary>
/// <returns>GradientStopCollection</returns>
GradientStopCollection ^
GetGradientStopCollection(
    );

internal:

LinearGradientBrush();

LinearGradientBrush(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush)</para>
///</summary>
public ref class RadialGradientBrush : Brush 
{
public:

/// <summary>
/// Gets or sets the center of the radial gradient. This will be in local coordinates and will
/// not depend on the geometry being filled.
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::GetCenter)</para>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::SetCenter)</para>
/// </summary>
property Point2F Center
{
    Point2F  get();
    void set(Point2F);
}


/// <summary>
/// Gets or sets offset of the origin relative to the radial gradient center.
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::SetGradientOriginOffset)</para>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::GetGradientOriginOffset)</para>
/// </summary>
property Point2F GradientOriginOffset
{
    Point2F get();
    void set(Point2F);
}
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::GetRadiusX)</para>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::SetRadiusX)</para>
/// </summary>
property FLOAT RadiusX
{
    FLOAT get();
    void set(FLOAT);
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::GetRadiusY)</para>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::SetRadiusY)</para>
/// </summary>
property FLOAT RadiusY
{
    FLOAT get();
    void set(FLOAT);
}


/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RadialGradientBrush::GetGradientStopCollection)</para>
/// </summary>
/// <returns>GradientStopCollection</returns>
GradientStopCollection ^
GetGradientStopCollection(
    );

internal:

RadialGradientBrush();

RadialGradientBrush(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1DrawingStateBlock)</para>
///</summary>
public ref class DrawingStateBlock : D2DResource 
{
public:

/// <summary>
/// Gets or sets the state currently contained within this state block resource.
/// <para>(Also see DirectX SDK: ID2D1DrawingStateBlock::GetDescription)</para>
/// <para>(Also see DirectX SDK: ID2D1DrawingStateBlock::SetDescription)</para>
/// </summary>
/// <param name="stateDescription">The stateDescription parameter.</param>
property DrawingStateDescription Description
{
    DrawingStateDescription get();
    void set (DrawingStateDescription);
}

/// <summary>
/// Retrieves the text-rendering configuration of the drawing state.
/// <para>(Also see DirectX SDK: ID2D1DrawingStateBlock::GetTextRenderingParams )</para>
/// </summary>
/// <returns>Returns the object that describes the text-rendering configuration of the drawing state.</returns>
RenderingParams^ GetTextRenderingParams();

/// <summary>
/// Specifies the text-rendering configuration of the drawing state. 
/// <para>(Also see DirectX SDK: ID2D1DrawingStateBlock::SetTextRenderingParams )</para>
/// </summary>
/// <param name="textRenderingParams">The text-rendering configuration of the drawing state, or null to clear current text rendering options.</param>
void SetTextRenderingParams(RenderingParams^ textRenderingParams );


internal:
DrawingStateBlock();

DrawingStateBlock(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget)</para>
///</summary>
public ref class RenderTarget : D2DResource 
{
public:

// TODO: Implement CreateBitmap
///// <summary>
///// Create a D2D bitmap by copying from memory, or create uninitialized.
///// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmap)</para>
///// </summary>
///// <param name="size">The size parameter.</param>
///// <param name="srcData">The srcData parameter.</param>
///// <param name="pitch">The pitch parameter.</param>
///// <param name="bitmapProperties">The bitmapProperties parameter.</param>
///// <returns>D2DBitmap</returns>
//D2DBitmap ^
//CreateBitmap(
//    SizeU size,
//    TypeTrait<void, BasicTrait<void>::typeForm, ParameterForm::Pointer>::ManagedType srcData,
//    UINT32 pitch,
//    BitmapProperties bitmapProperties
//    );

/// <summary>
/// Create a D2D bitmap by copying a WIC bitmap.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmapFromWicBitmap)</para>
/// </summary>
/// <param name="wicBitmapSource">The wicBitmapSource parameter.</param>
/// <param name="bitmapProperties">The bitmapProperties parameter.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateBitmapFromWicBitmap(
    BitmapSource^ wicBitmapSource,
    BitmapProperties bitmapProperties
    );

/// <summary>
/// Create a D2D bitmap by copying a WIC bitmap.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmapFromWicBitmap)</para>
/// </summary>
/// <param name="wicBitmapSource">The wicBitmapSource parameter.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateBitmapFromWicBitmap(
    BitmapSource^ wicBitmapSource
    );

/// <summary>
/// Create a D2D bitmap by sharing bits from another resource. The bitmap must be compatible
/// with the render target for the call to succeed. For example, an WICBitmap can be
/// shared with a software target, or a DXGI surface can be shared with a DXGI render
/// target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSharedBitmap)</para>
/// </summary>
/// <param name="wicBitmap">The wicBitmap.</param>
/// <param name="bitmapProperties">The bitmap properties.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateSharedBitmap(
    WICBitmap^ wicBitmap,
    BitmapProperties bitmapProperties
    );

/// <summary>
/// Create a D2D bitmap by sharing bits from another resource. The bitmap must be compatible
/// with the render target for the call to succeed. For example, an WICBitmap can be
/// shared with a software target, or a DXGI surface can be shared with a DXGI render
/// target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSharedBitmap)</para>
/// </summary>
/// <param name="wicBitmap">The wicBitmap.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateSharedBitmap(
    WICBitmap^ wicBitmap
    );

/// <summary>
/// Create a D2D bitmap by sharing bits from another resource. The bitmap must be compatible
/// with the render target for the call to succeed. For example, an WICBitmap can be
/// shared with a software target, or a DXGI surface can be shared with a DXGI render
/// target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSharedBitmap)</para>
/// </summary>
/// <param name="surface">The DXGI Surface.</param>
/// <param name="bitmapProperties">The bitmap properties.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateSharedBitmap(
    Surface^ surface,
    BitmapProperties bitmapProperties
    );

/// <summary>
/// Create a D2D bitmap by sharing bits from another resource. The bitmap must be compatible
/// with the render target for the call to succeed. For example, an WICBitmap can be
/// shared with a software target, or a DXGI surface can be shared with a DXGI render
/// target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSharedBitmap)</para>
/// </summary>
/// <param name="surface">The DXGI Surface.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateSharedBitmap(
    Surface^ surface
    );

/// <summary>
/// Create a D2D bitmap by sharing bits from another resource. The bitmap must be compatible
/// with the render target for the call to succeed. For example, an WICBitmap can be
/// shared with a software target, or a DXGI surface can be shared with a DXGI render
/// target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSharedBitmap)</para>
/// </summary>
/// <param name="bitmap">The Bitmap.</param>
/// <param name="bitmapProperties">The bitmap properties.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateSharedBitmap(
    D2DBitmap ^ bitmap,
    BitmapProperties bitmapProperties
    );

/// <summary>
/// Create a D2D bitmap by sharing bits from another resource. The bitmap must be compatible
/// with the render target for the call to succeed. For example, an WICBitmap can be
/// shared with a software target, or a DXGI surface can be shared with a DXGI render
/// target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSharedBitmap)</para>
/// </summary>
/// <param name="bitmap">The Bitmap.</param>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
CreateSharedBitmap(
    D2DBitmap ^ bitmap
    );

/// <summary>
/// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill or
/// pen a geometry.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmapBrush)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="bitmapBrushProperties">The bitmapBrushProperties parameter.</param>
/// <param name="brushProperties">The brushProperties parameter.</param>
/// <returns>BitmapBrush</returns>
BitmapBrush ^
CreateBitmapBrush(
    D2DBitmap ^ bitmap,
    BitmapBrushProperties bitmapBrushProperties,
    BrushProperties brushProperties
    );

/// <summary>
/// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill or
/// pen a geometry.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmapBrush)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="bitmapBrushProperties">The bitmapBrushProperties parameter.</param>
/// <returns>BitmapBrush</returns>
BitmapBrush ^
CreateBitmapBrush(
    D2DBitmap ^ bitmap,
    BitmapBrushProperties bitmapBrushProperties
    );

/// <summary>
/// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill or
/// pen a geometry.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmapBrush)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="brushProperties">The brushProperties parameter.</param>
/// <returns>BitmapBrush</returns>
BitmapBrush ^
CreateBitmapBrush(
    D2DBitmap ^ bitmap,
    BrushProperties brushProperties
    );

/// <summary>
/// Creates a bitmap brush. The bitmap is scaled, rotated, skewed or tiled to fill or
/// pen a geometry.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateBitmapBrush)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <returns>BitmapBrush</returns>
BitmapBrush ^
CreateBitmapBrush(
    D2DBitmap ^ bitmap
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSolidColorBrush)</para>
/// </summary>
/// <param name="color">The color parameter.</param>
/// <param name="brushProperties">The brushProperties parameter.</param>
/// <returns>SolidColorBrush</returns>
SolidColorBrush ^
CreateSolidColorBrush(
    ColorF color,
    BrushProperties brushProperties
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateSolidColorBrush)</para>
/// </summary>
/// <param name="color">The color parameter.</param>
/// <returns>SolidColorBrush</returns>
SolidColorBrush ^
CreateSolidColorBrush(
    ColorF color
    );
/// <summary>
/// A gradient stop collection represents a set of stops in an ideal unit length. This
/// is the source resource for a linear gradient and radial gradient brush.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateGradientStopCollection)</para>
/// </summary>
/// <param name="gradientStops">The gradientStops parameter.</param>
/// <param name="colorInterpolationGamma">Specifies which space the color interpolation occurs in.</param>
/// <param name="extendMode">Specifies how the gradient will be extended outside of the unit length.</param>
/// <returns>GradientStopCollection</returns>
GradientStopCollection ^
CreateGradientStopCollection(
    IEnumerable<GradientStop> ^ gradientStops,
    Gamma colorInterpolationGamma,
    ExtendMode extendMode
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateLinearGradientBrush)</para>
/// </summary>
/// <param name="linearGradientBrushProperties">The linearGradientBrushProperties parameter.</param>
/// <param name="brushProperties">The brushProperties parameter.</param>
/// <param name="gradientStopCollection">The gradientStopCollection parameter.</param>
/// <returns>LinearGradientBrush</returns>
LinearGradientBrush ^
CreateLinearGradientBrush(
    LinearGradientBrushProperties linearGradientBrushProperties,
    GradientStopCollection ^ gradientStopCollection,
    BrushProperties brushProperties
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateLinearGradientBrush)</para>
/// </summary>
/// <param name="linearGradientBrushProperties">The linearGradientBrushProperties parameter.</param>
/// <param name="gradientStopCollection">The gradientStopCollection parameter.</param>
/// <returns>LinearGradientBrush</returns>
LinearGradientBrush ^
CreateLinearGradientBrush(
    LinearGradientBrushProperties linearGradientBrushProperties,
    GradientStopCollection ^ gradientStopCollection
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateRadialGradientBrush)</para>
/// </summary>
/// <param name="radialGradientBrushProperties">The radialGradientBrushProperties parameter.</param>
/// <param name="brushProperties">The brushProperties parameter.</param>
/// <param name="gradientStopCollection">The gradientStopCollection parameter.</param>
/// <returns>RadialGradientBrush</returns>
RadialGradientBrush ^
CreateRadialGradientBrush(
    RadialGradientBrushProperties radialGradientBrushProperties,
    GradientStopCollection ^ gradientStopCollection,
    BrushProperties brushProperties
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateRadialGradientBrush)</para>
/// </summary>
/// <param name="radialGradientBrushProperties">The radialGradientBrushProperties parameter.</param>
/// <param name="gradientStopCollection">The gradientStopCollection parameter.</param>
/// <returns>RadialGradientBrush</returns>
RadialGradientBrush ^
CreateRadialGradientBrush(
    RadialGradientBrushProperties radialGradientBrushProperties,
    GradientStopCollection ^ gradientStopCollection
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredSize">The requested size of the target in DIPs. If the pixel size is not specified, the DPI is inherited from the parent target. However, the render target will never contain a fractional number of pixels.</param>
/// <param name="desiredPixelSize">The requested size of the render target in pixels. If the DIP size is also specified, the DPI is calculated from these two values. If the desired size is not specified, the DPI is inherited from the parent render target. If neither value is specified, the compatible render target will be the same size and have the same DPI as the parent target.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTarget(
    CompatibleRenderTargetOptions options,
    SizeF desiredSize,
    SizeU desiredPixelSize
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredSize">The requested size of the target in DIPs. If the pixel size is not specified, the DPI is inherited from the parent target. However, the render target will never contain a fractional number of pixels.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTarget(
    CompatibleRenderTargetOptions options,
    SizeF desiredSize
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredPixelSize">The requested size of the render target in pixels. If the DIP size is also specified, the DPI is calculated from these two values. If the desired size is not specified, the DPI is inherited from the parent render target. If neither value is specified, the compatible render target will be the same size and have the same DPI as the parent target.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTarget(
    CompatibleRenderTargetOptions options,
    SizeU desiredPixelSize
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTarget(
    CompatibleRenderTargetOptions options
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredSize">The requested size of the target in DIPs. If the pixel size is not specified, the DPI is inherited from the parent target. However, the render target will never contain a fractional number of pixels.</param>
/// <param name="desiredPixelSize">The requested size of the render target in pixels. If the DIP size is also specified, the DPI is calculated from these two values. If the desired size is not specified, the DPI is inherited from the parent render target. If neither value is specified, the compatible render target will be the same size and have the same DPI as the parent target.</param>
/// <param name="desiredFormat">The desired pixel format. The format must be compatible with the parent render target type. If the format is not specified, it will be inherited from the parent render target.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTargetWithPixelFormat(
    CompatibleRenderTargetOptions options,
    D2D::PixelFormat desiredFormat,
    SizeF desiredSize,
    SizeU desiredPixelSize
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredSize">The requested size of the target in DIPs. If the pixel size is not specified, the DPI is inherited from the parent target. However, the render target will never contain a fractional number of pixels.</param>
/// <param name="desiredFormat">The desired pixel format. The format must be compatible with the parent render target type. If the format is not specified, it will be inherited from the parent render target.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTargetWithPixelFormat(
    CompatibleRenderTargetOptions options,
    D2D::PixelFormat desiredFormat,
    SizeF desiredSize
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredPixelSize">The requested size of the render target in pixels. If the DIP size is also specified, the DPI is calculated from these two values. If the desired size is not specified, the DPI is inherited from the parent render target. If neither value is specified, the compatible render target will be the same size and have the same DPI as the parent target.</param>
/// <param name="desiredFormat">The desired pixel format. The format must be compatible with the parent render target type. If the format is not specified, it will be inherited from the parent render target.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTargetWithPixelFormat(
    CompatibleRenderTargetOptions options,
    D2D::PixelFormat desiredFormat,
    SizeU desiredPixelSize
    );

/// <summary>
/// Creates a bitmap render target whose bitmap can be used as a source for rendering
/// in the API.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateCompatibleRenderTarget)</para>
/// </summary>
/// <param name="desiredFormat">The desired pixel format. The format must be compatible with the parent render target type. If the format is not specified, it will be inherited from the parent render target.</param>
/// <param name="options">Allows the caller to retrieve a GDI compatible render target.</param>
/// <returns>A bitmap render target.</returns>
BitmapRenderTarget ^
CreateCompatibleRenderTargetWithPixelFormat(
    CompatibleRenderTargetOptions options,
    D2D::PixelFormat desiredFormat
    );

/// <summary>
/// Creates a layer resource that can be used on any target and which will resize under
/// the covers if necessary.
/// Use this overload to prevent unwanted reallocation of the layer backing store. The size is in DIPs, but, it is unaffected by the current world transform.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateLayer)</para>
/// </summary>
/// <param name="size">The resolution independent minimum size hint for the layer resource.</param>
/// <returns>Layer</returns>
Layer ^
CreateLayer(
    SizeF size
    );

/// <summary>
/// Creates a layer resource that can be used on any target and which will resize under
/// the covers if necessary.
/// The size will be unspecified so the returned resource is a placeholder and the backing store will be allocated to be the minimum size that can hold the content when the layer is pushed.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateLayer)</para>
/// </summary>
/// <returns>Layer</returns>
Layer ^
CreateLayer(
    );
/// <summary>
/// Create a D2D mesh.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::CreateMesh)</para>
/// </summary>
/// <returns>Mesh</returns>
Mesh ^
CreateMesh(
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawLine)</para>
/// </summary>
/// <param name="firstPoint">The first point.</param>
/// <param name="secondPoint">The second point.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
void
DrawLine(
    Point2F firstPoint,
    Point2F secondPoint,
    Brush ^ brush,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawLine)</para>
/// </summary>
/// <param name="firstPoint">The first point.</param>
/// <param name="secondPoint">The second point.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
void
DrawLine(
    Point2F firstPoint,
    Point2F secondPoint,
    Brush ^ brush,
    FLOAT strokeWidth
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawRectangle)</para>
/// </summary>
/// <param name="rect">The rect parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
void
DrawRectangle(
    RectF rect,
    Brush ^ brush,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawRectangle)</para>
/// </summary>
/// <param name="rect">The rect parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
void
DrawRectangle(
    RectF rect,
    Brush ^ brush,
    FLOAT strokeWidth
    );
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillRectangle)</para>
/// </summary>
/// <param name="rect">The rect parameter.</param>
/// <param name="brush">The brush parameter.</param>
void
FillRectangle(
    RectF rect,
    Brush ^ brush
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawRoundedRectangle)</para>
/// </summary>
/// <param name="roundedRect">The roundedRect parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
void
DrawRoundedRectangle(
    RoundedRect roundedRect,
    Brush ^ brush,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawRoundedRectangle)</para>
/// </summary>
/// <param name="roundedRect">The roundedRect parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
void
DrawRoundedRectangle(
    RoundedRect roundedRect,
    Brush ^ brush,
    FLOAT strokeWidth
    );
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillRoundedRectangle)</para>
/// </summary>
/// <param name="roundedRect">The roundedRect parameter.</param>
/// <param name="brush">The brush parameter.</param>
void
FillRoundedRectangle(
    RoundedRect roundedRect,
    Brush ^ brush
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawEllipse)</para>
/// </summary>
/// <param name="ellipse">The ellipse parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
void
DrawEllipse(
    Ellipse ellipse,
    Brush ^ brush,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawEllipse)</para>
/// </summary>
/// <param name="ellipse">The ellipse parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
void
DrawEllipse(
    Ellipse ellipse,
    Brush ^ brush,
    FLOAT strokeWidth    
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillEllipse)</para>
/// </summary>
/// <param name="ellipse">The ellipse parameter.</param>
/// <param name="brush">The brush parameter.</param>
void
FillEllipse(
    Ellipse ellipse,
    Brush ^ brush
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawGeometry)</para>
/// </summary>
/// <param name="geometry">The geometry parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
void
DrawGeometry(
    Geometry ^ geometry,
    Brush ^ brush,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawGeometry)</para>
/// </summary>
/// <param name="geometry">The geometry parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
void
DrawGeometry(
    Geometry ^ geometry,
    Brush ^ brush,
    FLOAT strokeWidth
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillGeometry)</para>
/// </summary>
/// <param name="geometry">The geometry parameter.</param>
/// <param name="brush">The brush parameter.</param>
/// <param name="opacityBrush">An optionally specified opacity brush. Only the alpha channel of the corresponding brush will be sampled and will be applied to the entire fill of the geometry. If this brush is specified, the fill brush must be a bitmap brush with an extend mode of D2D1_EXTEND_MODE_CLAMP.</param>
void
FillGeometry(
    Geometry ^ geometry,
    Brush ^ brush,
    Brush ^ opacityBrush
    );

/// <summary>
/// Fill a mesh. Since meshes can only render aliased content, the render target antialiasing
/// mode must be set to aliased.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillMesh)</para>
/// </summary>
/// <param name="mesh">The mesh parameter.</param>
/// <param name="brush">The brush parameter.</param>
void
FillMesh(
    Mesh ^ mesh,
    Brush ^ brush
    );

/// <summary>
/// Fill using the opacity channel of the supplied bitmap as a mask. The alpha channel
/// of the bitmap is used to represent the coverage of the geometry at each pixel, and
/// this is filled appropriately with the brush. The render target antialiasing mode
/// must be set to aliased.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillOpacityMask)</para>
/// </summary>
/// <param name="opacityMask">The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.</param>
/// <param name="brush">The brush used to paint the region of the render target specified by destinationRectangle.</param>
/// <param name="content">The type of contain the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.</param>
/// <param name="destinationRectangle">The dimensions of the area of the render target to paint, in device-independent pixels.</param>
/// <param name="sourceRectangle">The dimensions of the area of the bitmap to use as the opacity mask, in device-independent pixels.</param>
void
FillOpacityMask(
    D2DBitmap ^ opacityMask,
    Brush ^ brush,
    OpacityMaskContent content,
    RectF destinationRectangle,
    RectF sourceRectangle
    );

/// <summary>
/// Fill using the opacity channel of the supplied bitmap as a mask. The alpha channel
/// of the bitmap is used to represent the coverage of the geometry at each pixel, and
/// this is filled appropriately with the brush. The render target antialiasing mode
/// must be set to aliased.
/// The brush uses the sourceRectangle area to draw at the orgin of the bitmap.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillOpacityMask)</para>
/// </summary>
/// <param name="opacityMask">The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.</param>
/// <param name="brush">The brush used to paint the region of the render target specified by destinationRectangle.</param>
/// <param name="content">The type of contain the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.</param>
/// <param name="sourceRectangle">The dimensions of the area of the bitmap to use as the opacity mask, in device-independent pixels.</param>
void
FillOpacityMaskAtOrigin(
    D2DBitmap ^ opacityMask,
    Brush ^ brush,
    OpacityMaskContent content,
    RectF sourceRectangle
    );

/// <summary>
/// Fill using the opacity channel of the supplied bitmap as a mask. The alpha channel
/// of the bitmap is used to represent the coverage of the geometry at each pixel, and
/// this is filled appropriately with the brush. The render target antialiasing mode
/// must be set to aliased.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillOpacityMask)</para>
/// </summary>
/// <param name="opacityMask">The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.</param>
/// <param name="brush">The brush used to paint the region of the render target specified by destinationRectangle.</param>
/// <param name="content">The type of contain the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.</param>
/// <param name="destinationRectangle">The dimensions of the area of the render target to paint, in device-independent pixels.</param>
void
FillOpacityMask(
    D2DBitmap ^ opacityMask,
    Brush ^ brush,
    OpacityMaskContent content,
    RectF destinationRectangle
    );

/// <summary>
/// Fill using the opacity channel of the supplied bitmap as a mask. The alpha channel
/// of the bitmap is used to represent the coverage of the geometry at each pixel, and
/// this is filled appropriately with the brush. The render target antialiasing mode
/// must be set to aliased.
/// The brush paints a rectangle the same size as the opacityMask bitmap and positioned on the origin.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::FillOpacityMask)</para>
/// </summary>
/// <param name="opacityMask">The opacity mask to apply to the brush. The alpha value of each pixel in the region specified by sourceRectangle is multiplied with the alpha value of the brush after the brush has been mapped to the area defined by destinationRectangle.</param>
/// <param name="brush">The brush used to paint the region of the render target specified by destinationRectangle.</param>
/// <param name="content">The type of contain the opacity mask contains. The value is used to determine the color space in which the opacity mask is blended.</param>
void
FillOpacityMask(
    D2DBitmap ^ opacityMask,
    Brush ^ brush,
    OpacityMaskContent content
    );

/// <summary>Draws the specified bitmap at the origin with no scaling 
/// and applying nearest neighbor filtering if needed.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawBitmap)</para>
/// </summary>
void
DrawBitmap(
    D2DBitmap ^ bitmap
    );

/// <summary>Draws a portion of the specified bitmap after scaling it to the size of the specified rectangle.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="opacity">The opacity parameter.</param>
/// <param name="interpolationMode">The interpolationMode parameter.</param>
/// <param name="destinationRectangle">The destinationRectangle parameter.</param>
/// <param name="sourceRectangle">The sourceRectangle parameter.</param>
void
DrawBitmap(
    D2DBitmap ^ bitmap,
    FLOAT opacity,
    BitmapInterpolationMode interpolationMode,
    RectF destinationRectangle,
    RectF sourceRectangle
    );

/// <summary>Draws the entire specified bitmap after scaling it to the size of the specified rectangle.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="opacity">The opacity parameter.</param>
/// <param name="interpolationMode">The interpolationMode parameter.</param>
/// <param name="destinationRectangle">The destinationRectangle parameter.</param>
void
DrawBitmap(
    D2DBitmap ^ bitmap,
    FLOAT opacity,
    BitmapInterpolationMode interpolationMode,
    RectF destinationRectangle
    );

/// <summary>Draws a portion of the specified bitmap after scaling it to the size of the specified rectangle.
/// The selected portion of the bitmap will be drawn at the origin of the render target. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="opacity">The opacity parameter.</param>
/// <param name="interpolationMode">The interpolationMode parameter.</param>
/// <param name="sourceRectangle">The sourceRectangle parameter.</param>
void
DrawBitmapAtOrigin(
    D2DBitmap ^ bitmap,
    FLOAT opacity,
    BitmapInterpolationMode interpolationMode,
    RectF sourceRectangle
    );

/// <summary>Draws the entire specified bitmap after scaling it to the size of the specified rectangle.
/// The selected portion of the bitmap will be drawn at the origin of the render target. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawBitmap)</para>
/// </summary>
/// <param name="bitmap">The bitmap parameter.</param>
/// <param name="opacity">The opacity parameter.</param>
/// <param name="interpolationMode">The interpolationMode parameter.</param>
void
DrawBitmap(
    D2DBitmap ^ bitmap,
    FLOAT opacity,
    BitmapInterpolationMode interpolationMode
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetTransform)</para>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SetTransform)</para>
/// </summary>
property Matrix3x2F Transform
{
    Matrix3x2F get();
    void set(Matrix3x2F);
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetAntialiasMode)</para>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SetAntialiasMode)</para>
/// </summary>
property D2D::AntialiasMode AntialiasMode
{
    D2D::AntialiasMode get();
    void set(D2D::AntialiasMode);
}


/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetTextAntialiasMode)</para>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SetTextAntialiasMode)</para>
/// </summary>
/// <param name="textAntialiasMode">The textAntialiasMode parameter.</param>
property D2D::TextAntialiasMode TextAntialiasMode
{
    D2D::TextAntialiasMode get();
    void set(D2D::TextAntialiasMode);
}

/// <summary>
/// Get or Set a tag to correspond to the succeeding primitives. If an error occurs rendering
/// a primtive, the tags can be returned from the Flush or EndDraw call.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetTags)</para>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SetTags)</para>
/// </summary>
property D2D::Tags Tags
{
    D2D::Tags get();
    void set(D2D::Tags);
}

/// <summary>
/// Start a layer of drawing calls. The way in which the layer must be resolved is specified
/// first as well as the logical resource that stores the layer parameters. The supplied
/// layer resource might grow if the specified content cannot fit inside it. The layer
/// will grow monitonically on each axis.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::PushLayer)</para>
/// </summary>
/// <param name="layerParameters">The layerParameters parameter.</param>
/// <param name="layer">The layer parameter.</param>
void
PushLayer(
    LayerParameters layerParameters,
    Layer ^ layer
    );

/// <summary>
/// Ends a layer that was defined with particular layer resources.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::PopLayer)</para>
/// </summary>
void
PopLayer(
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::Flush)</para>
/// </summary>
/// <returns>The associated tags.</returns>
D2D::Tags
Flush(
    );

/// <summary>
/// Gets the current drawing state and saves it into the supplied IDrawingStatckBlock.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SaveDrawingState)</para>
/// </summary>
/// <param name="drawingStateBlock">The drawingStateBlock parameter.</param>
void
SaveDrawingState(
    DrawingStateBlock ^ drawingStateBlock
    );

/// <summary>
/// Copies the state stored in the block interface.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::RestoreDrawingState)</para>
/// </summary>
/// <param name="drawingStateBlock">The drawingStateBlock parameter.</param>
void
RestoreDrawingState(
    DrawingStateBlock ^ drawingStateBlock
    );

/// <summary>
/// Pushes a clip. The clip can be antialiased. The clip must be axis aligned. If the
/// current world transform is not axis preserving, then the bounding box of the transformed
/// clip rect will be used. The clip will remain in effect until a PopAxisAligned clip
/// call is made.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::PushAxisAlignedClip)</para>
/// </summary>
/// <param name="clipRect">The clipRect parameter.</param>
/// <param name="antialiasMode">The antialiasMode parameter.</param>
void
PushAxisAlignedClip(
    RectF clipRect,
    D2D::AntialiasMode antialiasMode
    );

/// <summary>
/// Removes the last axis-aligned clip from the render target. After this method is called, the clip is no longer applied to subsequent drawing operations.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::PopAxisAlignedClip)</para>
/// </summary>
/// <remarks>
/// A PushAxisAlignedClip/PopAxisAlignedClip pair can occur around or within a PushLayer/PopLayer pair, but may not overlap. For example, a PushAxisAlignedClip, PushLayer, PopLayer, PopAxisAlignedClip sequence is valid, but a PushAxisAlignedClip, PushLayer, PopAxisAlignedClip, PopLayer sequence is not. 
/// PopAxisAlignedClip must be called once for every call to PushAxisAlignedClip.
/// </remarks>
void
PopAxisAlignedClip(
    );

/// <summary>
/// Clears the drawing area to the specified color. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::Clear)</para>
/// </summary>
/// <remarks>For render targets that support alpha, the clearColor is treated as straight alpha, regardless of whether the alpha mode is straight alpha or premultiplied alpha. For targets that ignore alpha, the alpha of the clear color is interpreted as fully opaque.
/// If the render target has an active clip (specified by PushAxisAlignedClip), the clear command is only applied to the area within the clip region.
/// </remarks>
/// <param name="clearColor">The clearColor parameter.</param>
void
Clear(
    ColorF clearColor
    );

/// <summary>
/// Clears the drawing area to transparent black. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::Clear)</para>
/// </summary>
void
Clear(
    );

/// <summary>
/// Start drawing on this render target. Draw calls can only be issued between a BeginDraw
/// and EndDraw call.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::BeginDraw)</para>
/// </summary>
void
BeginDraw(
    );

/// <summary>
/// Ends drawing on the render target, error results can be retrieved at this time, or
/// when calling flush.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::EndDraw)</para>
/// </summary>
/// <returns>The associated tags.</returns>
D2D::Tags
EndDraw(
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetPixelFormat)</para>
/// </summary>
/// <returns>PixelFormat</returns>
property D2D::PixelFormat PixelFormat
{
    D2D::PixelFormat  get();
}

/// <summary>
/// Gets or sets the DPI on the render target. This results in the render target being interpretted
/// to a different scale. Neither DPI can be negative. If zero is specified for both,
/// the system DPI is chosen. If one is zero and the other unspecified, the DPI is not
/// changed.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetDpi)</para>
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SetDpi)</para>
/// </summary>
/// <param name="dpi">The dpi value to set.</param>
property DpiF Dpi
{
    DpiF get();
    void set(DpiF);
}

/// <summary>
/// Returns the size of the render target in DIPs.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetSize)</para>
/// </summary>
property SizeF Size
{
    SizeF get();
}

/// <summary>
/// Returns the size of the render target in pixels.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetPixelSize)</para>
/// </summary>
property SizeU PixelSize
{
    SizeU get();
}

/// <summary>
/// Returns the maximum bitmap and render target size that is guaranteed to be supported
/// by the render target.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetMaximumBitmapSize)</para>
/// </summary>
property UINT32 MaximumBitmapSize
{
    UINT32 get();
}
    
/// <summary>
/// Returns true if the given properties are supported by this render target. The DPI
/// is ignored. NOTE: If the render target type is software, then neither feature level 9
/// nor feature level 10 will be considered to be supported.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::IsSupported)</para>
/// </summary>
/// <param name="renderTargetProperties">The renderTargetProperties parameter.</param>
/// <returns>True if supported; otherwise false.</returns>
Boolean
IsSupported(
    RenderTargetProperties renderTargetProperties
    );

/// <summary>Draws the specified text using the format information provided by a DWrite TextFormat object.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawText)</para>
/// </summary>
/// <param name="text">Characters to draw.</param>
/// <param name="textFormat">An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.</param>
/// <param name="layoutRect">The size and position of the area in which the text is drawn.</param>
/// <param name="defaultForegroundBrush">The brush used to paint the text.</param>
/// <param name="options">A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is None, which indicates that text should be snapped to pixel boundaries and it should be clipped to the layout rectangle.</param>
/// <param name="measuringMode">A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is Natural mode.</param>
void DrawText(
    String^ text,
    TextFormat^ textFormat,
    RectF layoutRect,
    Brush^ defaultForegroundBrush,
    DrawTextOptions options,
    MeasuringMode measuringMode);

/// <summary>Draws the specified text using the format information provided by a DWrite TextFormat object.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawText)</para>
/// </summary>
/// <param name="text">Characters to draw.</param>
/// <param name="textFormat">An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.</param>
/// <param name="layoutRect">The size and position of the area in which the text is drawn.</param>
/// <param name="defaultForegroundBrush">The brush used to paint the text.</param>
/// <param name="options">A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is None, which indicates that text should be snapped to pixel boundaries and it should be clipped to the layout rectangle.</param>
void DrawText(
    String^ text,
    TextFormat^ textFormat,
    RectF layoutRect,
    Brush^ defaultForegroundBrush,
    DrawTextOptions options
    );

/// <summary>Draws the specified text using the format information provided by a DWrite TextFormat object.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawText)</para>
/// </summary>
/// <param name="text">Characters to draw.</param>
/// <param name="textFormat">An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.</param>
/// <param name="layoutRect">The size and position of the area in which the text is drawn.</param>
/// <param name="defaultForegroundBrush">The brush used to paint the text.</param>
/// <param name="measuringMode">A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is Natural mode.</param>
void DrawText(
    String^ text,
    TextFormat^ textFormat,
    RectF layoutRect,
    Brush^ defaultForegroundBrush,    
    MeasuringMode measuringMode);

/// <summary>Draws the specified text using the format information provided by a DWrite TextFormat object.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawText)</para>
/// </summary>
/// <param name="text">Characters to draw.</param>
/// <param name="textFormat">An object that describes formatting details of the text to draw, such as the font, the font size, and flow direction.</param>
/// <param name="layoutRect">The size and position of the area in which the text is drawn.</param>
/// <param name="defaultForegroundBrush">The brush used to paint the text.</param>
void DrawText(
    String^ text,
    TextFormat^ textFormat,
    RectF layoutRect,
    Brush^ defaultForegroundBrush);

/// <summary>
/// Retrieves the render target's current text-rendering options.
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::GetTextRenderingParams )</para>
/// </summary>
/// <returns>Returns the render target's current text-rendering options.</returns>
/// <remarks>
/// Note that the render target's text antialiasing mode overrides any antialiasing 
/// mode specified by the RenderingParams object.
/// </remarks>
RenderingParams^ GetTextRenderingParams();

/// <summary>
/// Specifies text rendering options to apply to all subsequent text and glyph drawing operations. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::SetTextRenderingParams )</para>
/// </summary>
/// <param name="textRenderingParams">The text rendering options to apply to all subsequent text and glyph drawing operations, or null to clear current text rendering options.</param>
/// <remarks>
/// Note that the render target's text antialiasing mode overrides any antialiasing 
/// mode specified by the RenderingParams object.
/// </remarks>
void SetTextRenderingParams(RenderingParams^ textRenderingParams );


/// <summary>
/// Draws the formatted text described by the specified IDWriteTextLayout object. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawTextLayout )</para>
/// </summary>
/// <param name="origin">The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.</param>
/// <param name="textLayout">The formatted text to draw.</param>
/// <param name="defaultForegroundBrush">The brush used to paint any text in textLayout that does not already have a brush associated with it.</param>
/// <param name="options">A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is None, which indicates that text should be snapped to pixel boundaries and it should be clipped to the layout rectangle.</param>
void DrawTextLayout(
    Point2F origin,
    TextLayout^ textLayout,
    Brush^ defaultForegroundBrush,
    DrawTextOptions options);

/// <summary>
/// Draws the formatted text described by the specified IDWriteTextLayout object. 
/// <para>(Also see DirectX SDK: ID2D1RenderTarget::DrawTextLayout )</para>
/// </summary>
/// <param name="origin">The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.</param>
/// <param name="textLayout">The formatted text to draw.</param>
/// <param name="defaultForegroundBrush">The brush used to paint any text in textLayout that does not already have a brush associated with it.</param>
void DrawTextLayout(
    Point2F origin,
    TextLayout^ textLayout,
    Brush^ defaultForegroundBrush);

internal:
    RenderTarget();
    RenderTarget(
        IUnknown *pInner
        );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1BitmapRenderTarget)</para>
///</summary>
public ref class BitmapRenderTarget : RenderTarget 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1BitmapRenderTarget::GetBitmap)</para>
/// </summary>
/// <returns>D2DBitmap</returns>
D2DBitmap ^
GetBitmap(
    );

internal:

BitmapRenderTarget();

BitmapRenderTarget(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1HwndRenderTarget)</para>
///</summary>
public ref class HwndRenderTarget : RenderTarget 
{
public:

/// <summary>
/// Indicates whether the HWND associated with this render target is occluded.
/// <para>(Also see DirectX SDK: ID2D1HwndRenderTarget::CheckWindowState)</para>
/// </summary>
property Boolean IsOccluded
{
    Boolean get();
}

/// <summary>
/// Check the current WindowState.
/// <para>(Also see DirectX SDK: ID2D1HwndRenderTarget::CheckWindowState)</para>
/// </summary>
/// <returns>The current WindowState</returns>
WindowState CheckWindowState();

/// <summary>
/// Resize the buffer underlying the render target to the specified device pixel size. 
/// <para>(Also see DirectX SDK: ID2D1HwndRenderTarget::Resize)</para>
/// </summary>
/// <remarks>
/// This operation might fail if there
/// is insufficent video memory or system memory, or if the render target is resized
/// beyond the maximum bitmap size. If the method fails, the render target will be placed
/// in a zombie state and an exception will be thrown  when EndDraw is called.
/// In addition an appropriate exception will be thrown from Resize.
/// </remarks>
/// <param name="pixelSize">The pixelSize parameter.</param>
void
Resize(
    SizeU pixelSize
    );

/// <summary> Get the Window handle
/// <para>(Also see DirectX SDK: ID2D1HwndRenderTarget::GetHwnd)</para>
/// </summary>
property IntPtr WindowHandle 
{
    IntPtr get();
}

internal:

HwndRenderTarget();

HwndRenderTarget(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget)</para>
///</summary>
public interface class IGdiInteropRenderTarget 
{
public:
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget::GetDC)</para>
/// </summary>
/// <param name="mode">The mode parameter.</param>
/// <returns>HDC</returns>
virtual
IntPtr
GetDC(
    DcInitializeMode mode
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget::ReleaseDC)</para>
/// </summary>
/// <param name="updateRectangle">The update rectantgle.</param>
virtual
void
ReleaseDC(
    RECT updateRectangle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget::ReleaseDC)</para>
/// </summary>
virtual
void
ReleaseDC();

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget)</para>
///</summary>
public ref class GdiInteropRenderTarget : DirectUnknown , IGdiInteropRenderTarget
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget::GetDC)</para>
/// </summary>
/// <param name="mode">The mode parameter.</param>
/// <returns>HDC</returns>
virtual
IntPtr
GetDC(
    DcInitializeMode mode
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget::ReleaseDC)</para>
/// </summary>
/// <param name="updateRectangle">The update rectangle.</param>
virtual
void
ReleaseDC(
    RECT updateRectangle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GdiInteropRenderTarget::ReleaseDC)</para>
/// </summary>
virtual
void
ReleaseDC(
    );
internal:

GdiInteropRenderTarget();

GdiInteropRenderTarget(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1DCRenderTarget)</para>
///</summary>
public ref class DCRenderTarget : RenderTarget 
{
public:

/// <summary>
/// Binds the render target to the device context to which it issues drawing commands.
/// <para>(Also see DirectX SDK: ID2D1DCRenderTarget::BindDC)</para>
/// </summary>
/// <param name="deviceContextHandle">The device context to which the render target issues drawing commands.</param>
/// <param name="subRect">The dimensions of the handle to a device context (HDC) to which the render target is bound. When this rectangle changes, the render target updates its size to match.</param>
void
BindDC(
    IntPtr deviceContextHandle,
    RECT subRect
    );

internal:

DCRenderTarget();

DCRenderTarget(
    IUnknown *pInner
    );

};

/// <summary>
/// D2DResource interface that holds pen style properties.
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle)</para>
///</summary>
public ref class StrokeStyle : D2DResource 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetStartCap)</para>
/// </summary>
/// <returns>CapStyle</returns>
property CapStyle StartCap
{
    CapStyle get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetEndCap)</para>
/// </summary>
/// <returns>CapStyle</returns>
property CapStyle EndCap
{
    CapStyle get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetDashCap)</para>
/// </summary>
/// <returns>CapStyle</returns>
property CapStyle DashCap
{
    CapStyle get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetMiterLimit)</para>
/// </summary>
/// <returns>FLOAT</returns>
property FLOAT MiterLimit
{
    FLOAT get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetLineJoin)</para>
/// </summary>
/// <returns>LineJoin</returns>
property D2D::LineJoin LineJoin
{
    D2D::LineJoin get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetDashOffset)</para>
/// </summary>
/// <returns>FLOAT</returns>
property FLOAT DashOffset
{
    FLOAT get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetDashStyle)</para>
/// </summary>
/// <returns>DashStyle</returns>
property D2D::DashStyle DashStyle
{
    D2D::DashStyle get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetDashesCount)</para>
/// </summary>
/// <returns>UINT32</returns>
property UINT32 DashesCount
{
    UINT32 get();
}

/// <summary>
/// Returns the dashes from the object into an array. 
/// <para>(Also see DirectX SDK: ID2D1StrokeStyle::GetDashes)</para>
/// </summary>
/// <returns>FLOAT</returns>
cli::array<FLOAT> ^
GetDashes(
    );

internal:

StrokeStyle();

StrokeStyle(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Geometry)</para>
///</summary>
public ref class Geometry : D2DResource 
{
public:

/// <summary>
/// Retrieve the bounds of the geometry, with an applied transform.
/// <para>(Also see DirectX SDK: ID2D1Geometry::GetBounds)</para>
/// </summary>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <returns>The bounds parameter.</returns>
RectF
GetBounds(
    Matrix3x2F worldTransform
    );

/// <summary>
/// Retrieve the bounds of the geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::GetBounds)</para>
/// </summary>
/// <returns>The bounds parameter.</returns>
RectF
GetBounds(
    );

/// <summary>
/// Get the bounds of the corresponding geometry after it has been widened or have an
/// optional pen style applied.
/// <para>(Also see DirectX SDK: ID2D1Geometry::GetWidenedBounds)</para>
/// </summary>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>The bounds parameter.</returns>
RectF
GetWidenedBounds(
    FLOAT strokeWidth,
    StrokeStyle^ strokeStyle,
    FLOAT flatteningTolerance,
    Matrix3x2F worldTransform
    );

/// <summary>
/// Get the bounds of the corresponding geometry after it has been widened or have an
/// optional pen style applied.
/// <para>(Also see DirectX SDK: ID2D1Geometry::GetWidenedBounds)</para>
/// </summary>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>The bounds parameter.</returns>
RectF
GetWidenedBounds(
    FLOAT strokeWidth,
    StrokeStyle^ strokeStyle,
    FLOAT flatteningTolerance
    );

/// <summary>
/// Checks to see whether the corresponding penned and widened geometry contains the
/// given point.
/// <para>(Also see DirectX SDK: ID2D1Geometry::StrokeContainsPoint)</para>
/// </summary>
/// <param name="point">The point parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>Boolean</returns>
Boolean
StrokeContainsPoint(
    Point2F point,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle,
    FLOAT flatteningTolerance,
    Matrix3x2F worldTransform
    );


/// <summary>
/// Checks to see whether the corresponding penned and widened geometry contains the
/// given point.
/// <para>(Also see DirectX SDK: ID2D1Geometry::StrokeContainsPoint)</para>
/// </summary>
/// <param name="point">The point parameter.</param>
/// <param name="strokeWidth">The strokeWidth parameter.</param>
/// <param name="strokeStyle">The strokeStyle parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>Boolean</returns>
Boolean
StrokeContainsPoint(
    Point2F point,
    FLOAT strokeWidth,
    StrokeStyle ^ strokeStyle,
    FLOAT flatteningTolerance
    );

/// <summary>
/// Test whether the given fill of this geometry would contain this point.
/// <para>(Also see DirectX SDK: ID2D1Geometry::FillContainsPoint)</para>
/// </summary>
/// <param name="point">The point parameter.</param>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>Boolean</returns>
Boolean
FillContainsPoint(
    Point2F point,
    FLOAT flatteningTolerance,
    Matrix3x2F worldTransform
    );

/// <summary>
/// Test whether the given fill of this geometry would contain this point.
/// <para>(Also see DirectX SDK: ID2D1Geometry::FillContainsPoint)</para>
/// </summary>
/// <param name="point">The point parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>Boolean</returns>
Boolean
FillContainsPoint(
    Point2F point,
    FLOAT flatteningTolerance
    );

/// <summary>
/// Compare how one geometry intersects or contains another geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::CompareWithGeometry)</para>
/// </summary>
/// <param name="inputGeometry">The inputGeometry parameter.</param>
/// <param name="inputGeometryTransform">The inputGeometryTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>GeometryRelation</returns>
GeometryRelation
CompareWithGeometry(
    Geometry ^ inputGeometry,
    FLOAT flatteningTolerance,
    Matrix3x2F inputGeometryTransform
    );

/// <summary>
/// Compare how one geometry intersects or contains another geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::CompareWithGeometry)</para>
/// </summary>
/// <param name="inputGeometry">The inputGeometry parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>GeometryRelation</returns>
GeometryRelation
CompareWithGeometry(
    Geometry ^ inputGeometry,
    FLOAT flatteningTolerance
    );

/// <summary>
/// Tessellates a geometry into triangles.
/// <para>(Also see DirectX SDK: ID2D1Geometry::Tessellate)</para>
/// </summary>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <param name="tessellationSink">The tessellationSink parameter.</param>
void
Tessellate(
    FLOAT flatteningTolerance,
    TessellationSink ^ tessellationSink,
    Matrix3x2F worldTransform
    );

/// <summary>
/// Tessellates a geometry into triangles.
/// <para>(Also see DirectX SDK: ID2D1Geometry::Tessellate)</para>
/// </summary>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <param name="tessellationSink">The tessellationSink parameter.</param>
void
Tessellate(
    FLOAT flatteningTolerance,
    TessellationSink ^ tessellationSink
    );

/// <summary>
/// Computes the area of the geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::ComputeArea)</para>
/// </summary>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>The area.</returns>
FLOAT
ComputeArea(
    FLOAT flatteningTolerance,
    Matrix3x2F worldTransform
    );

/// <summary>
/// Computes the area of the geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::ComputeArea)</para>
/// </summary>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>The area.</returns>
FLOAT
ComputeArea(
    FLOAT flatteningTolerance
    );

/// <summary>
/// Computes the length of the geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::ComputeLength)</para>
/// </summary>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>The length.</returns>
FLOAT
ComputeLength(
    FLOAT flatteningTolerance,
    Matrix3x2F worldTransform
    );

/// <summary>
/// Computes the length of the geometry.
/// <para>(Also see DirectX SDK: ID2D1Geometry::ComputeLength)</para>
/// </summary>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <returns>The length.</returns>
FLOAT
ComputeLength(
    FLOAT flatteningTolerance
    );

/// <summary>
/// Computes the point and tangent a given distance along the path.
/// <para>(Also see DirectX SDK: ID2D1Geometry::ComputePointAtLength)</para>
/// </summary>
/// <param name="length">The length parameter.</param>
/// <param name="worldTransform">The worldTransform parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <param name="unitTangentVector">The unitTangentVector parameter.</param>
/// <returns>The computed point.</returns>
Point2F
ComputePointAtLength(
    FLOAT length,
    FLOAT flatteningTolerance,
    [Runtime::InteropServices::Out] Point2F % unitTangentVector,
    Matrix3x2F worldTransform
    );

/// <summary>
/// Computes the point and tangent a given distance along the path.
/// <para>(Also see DirectX SDK: ID2D1Geometry::ComputePointAtLength)</para>
/// </summary>
/// <param name="length">The length parameter.</param>
/// <param name="flatteningTolerance">The flatteningTolerance parameter.</param>
/// <param name="unitTangentVector">The unitTangentVector parameter.</param>
/// <returns>The computed point.</returns>
Point2F
ComputePointAtLength(
    FLOAT length,
    FLOAT flatteningTolerance,
    [Runtime::InteropServices::Out] Point2F % unitTangentVector
    );

void
Simplify(
    GeometrySimplificationOption simplificationOption,
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink,
    Matrix3x2F pWorldTransform
    );

void
Simplify(
    GeometrySimplificationOption simplificationOption,
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink
    );

void
CombineWithGeometry(
    Geometry ^ pInputGeometry,
    CombineMode combineMode,
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink,
    Matrix3x2F pInputGeometryTransform
    );

void
CombineWithGeometry(
    Geometry ^ pInputGeometry,
    CombineMode combineMode,
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink
    );

void
Outline(
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink,
    Matrix3x2F pWorldTransform
    );


void
Outline(
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink
    );

void
Tessellate(
    FLOAT flatteningTolerance,
    ITessellationSink ^ pITessellationSink,
    Matrix3x2F pWorldTransform
    );

void
Tessellate(
    FLOAT flatteningTolerance,
    ITessellationSink ^ pITessellationSink
    );

void
Widen(
    FLOAT strokeWidth,
    StrokeStyle ^ pIStrokeStyle,
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink,
    Matrix3x2F pWorldTransform
    );

void
Widen(
    FLOAT strokeWidth,
    StrokeStyle ^ pIStrokeStyle,
    FLOAT flatteningTolerance,
    ISimplifiedGeometrySink ^ pIGeometrySink
    );

internal:

Geometry();

Geometry(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RectangleGeometry)</para>
///</summary>
public ref class RectangleGeometry : Geometry 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RectangleGeometry::GetRect)</para>
/// </summary>
property RectF Rectangle
{
    RectF get();
}

internal:

RectangleGeometry();

RectangleGeometry(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RoundedRectangleGeometry)</para>
///</summary>
public ref class RoundedRectangleGeometry : Geometry 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1RoundedRectangleGeometry::GetRoundedRect)</para>
/// </summary>
property RoundedRect RoundedRectangle
{
    RoundedRect get();
}

internal:

RoundedRectangleGeometry();

RoundedRectangleGeometry(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1EllipseGeometry)</para>
///</summary>
public ref class EllipseGeometry : Geometry 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1EllipseGeometry::GetEllipse)</para>
/// </summary>
property D2D::Ellipse Ellipse
{
    D2D::Ellipse get();
}

internal:

EllipseGeometry();

EllipseGeometry(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink)</para>
///</summary>
public interface class ISimplifiedGeometrySink 
{
public:
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::SetFillMode)</para>
/// </summary>
/// <param name="fillMode">The fillMode parameter.</param>
virtual
void
SetFillMode(
    FillMode fillMode
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::SetSegmentFlags)</para>
/// </summary>
/// <param name="vertexFlags">The vertexFlags parameter.</param>
virtual
void
SetSegmentFlags(
    PathSegment vertexFlags
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::BeginFigure)</para>
/// </summary>
/// <param name="startPoint">The startPoint parameter.</param>
/// <param name="figureBegin">The figureBegin parameter.</param>
virtual
void
BeginFigure(
    Point2F startPoint,
    FigureBegin figureBegin
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::AddLines)</para>
/// </summary>
/// <param name="points">The points parameter.</param>
virtual
void
AddLines(
    IEnumerable<Point2F> ^ points
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::AddBeziers)</para>
/// </summary>
/// <param name="beziers">The beziers parameter.</param>
virtual
void
AddBeziers(
    IEnumerable<BezierSegment> ^ beziers
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::EndFigure)</para>
/// </summary>
/// <param name="figureEnd">The figureEnd parameter.</param>
virtual
void
EndFigure(
    FigureEnd figureEnd
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::Close)</para>
/// </summary>
virtual
void
Close(
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink)</para>
///</summary>
public ref class SimplifiedGeometrySink : DirectUnknown , ISimplifiedGeometrySink
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::SetFillMode)</para>
/// </summary>
/// <param name="fillMode">The fillMode parameter.</param>
virtual
void
SetFillMode(
    FillMode fillMode
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::SetSegmentFlags)</para>
/// </summary>
/// <param name="vertexFlags">The vertexFlags parameter.</param>
virtual
void
SetSegmentFlags(
    PathSegment vertexFlags
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::BeginFigure)</para>
/// </summary>
/// <param name="startPoint">The startPoint parameter.</param>
/// <param name="figureBegin">The figureBegin parameter.</param>
virtual
void
BeginFigure(
    Point2F startPoint,
    FigureBegin figureBegin
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::AddLines)</para>
/// </summary>
/// <param name="points">The points parameter.</param>
virtual
void
AddLines(
    IEnumerable<Point2F> ^ points
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::AddBeziers)</para>
/// </summary>
/// <param name="beziers">The beziers parameter.</param>
virtual
void
AddBeziers(
    IEnumerable<BezierSegment> ^ beziers
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::EndFigure)</para>
/// </summary>
/// <param name="figureEnd">The figureEnd parameter.</param>
virtual
void
EndFigure(
    FigureEnd figureEnd
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1SimplifiedGeometrySink::Close)</para>
/// </summary>
virtual
void
Close(
    );

internal:

SimplifiedGeometrySink();

SimplifiedGeometrySink(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink)</para>
///</summary>
public interface class IGeometrySink : ISimplifiedGeometrySink
{
public:
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddLine)</para>
/// </summary>
/// <param name="point">The point parameter.</param>
virtual
void
AddLine(
    Point2F point
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddBezier)</para>
/// </summary>
/// <param name="bezier">The bezier parameter.</param>
virtual
void
AddBezier(
    BezierSegment bezier
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddQuadraticBezier)</para>
/// </summary>
/// <param name="bezier">The bezier parameter.</param>
virtual
void
AddQuadraticBezier(
    QuadraticBezierSegment bezier
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddQuadraticBeziers)</para>
/// </summary>
/// <param name="beziers">The beziers parameter.</param>
virtual
void
AddQuadraticBeziers(
    IEnumerable<QuadraticBezierSegment> ^ beziers
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddArc)</para>
/// </summary>
/// <param name="arc">The arc parameter.</param>
virtual
void
AddArc(
    ArcSegment arc
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink)</para>
///</summary>
public ref class GeometrySink : SimplifiedGeometrySink , IGeometrySink
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddLine)</para>
/// </summary>
/// <param name="point">The point parameter.</param>
virtual
void
AddLine(
    Point2F point
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddBezier)</para>
/// </summary>
/// <param name="bezier">The bezier parameter.</param>
virtual
void
AddBezier(
    BezierSegment bezier
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddQuadraticBezier)</para>
/// </summary>
/// <param name="bezier">The bezier parameter.</param>
virtual
void
AddQuadraticBezier(
    QuadraticBezierSegment bezier
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddQuadraticBeziers)</para>
/// </summary>
/// <param name="beziers">The beziers parameter.</param>
virtual
void
AddQuadraticBeziers(
    IEnumerable<QuadraticBezierSegment> ^ beziers
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometrySink::AddArc)</para>
/// </summary>
/// <param name="arc">The arc parameter.</param>
virtual
void
AddArc(
    ArcSegment arc
    );

internal:

GeometrySink();

GeometrySink(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TessellationSink)</para>
///</summary>
public interface class ITessellationSink 
{
public:
/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TessellationSink::AddTriangles)</para>
/// </summary>
/// <param name="triangles">The triangles parameter.</param>
virtual
void
AddTriangles(
    IEnumerable<Triangle> ^ triangles
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TessellationSink::Close)</para>
/// </summary>
virtual
void
Close(
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TessellationSink)</para>
///</summary>
public ref class TessellationSink : DirectUnknown , ITessellationSink
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TessellationSink::AddTriangles)</para>
/// </summary>
/// <param name="triangles">The triangles parameter.</param>
virtual
void
AddTriangles(
    IEnumerable<Triangle> ^ triangles
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TessellationSink::Close)</para>
/// </summary>
virtual
void
Close(
    );

internal:

TessellationSink();

TessellationSink(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1PathGeometry)</para>
///</summary>
public ref class PathGeometry : Geometry 
{
public:

/// <summary>
/// Opens a geometry sink that will be used to create this path geometry.
/// <para>(Also see DirectX SDK: ID2D1PathGeometry::Open)</para>
/// </summary>
/// <returns>GeometrySink</returns>
GeometrySink ^
Open(
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1PathGeometry::GetSegmentCount)</para>
/// </summary>
property UINT32 SegmentCount
{
    UINT32 get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1PathGeometry::GetFigureCount)</para>
/// </summary>
property UINT32 FigureCount
{
    UINT32 get();
}


void
Stream(
    IGeometrySink ^ pIGeometrySink
    );
internal:

PathGeometry();

PathGeometry(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometryGroup)</para>
///</summary>
public ref class GeometryGroup : Geometry 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometryGroup::GetFillMode)</para>
/// </summary>
property D2D::FillMode FillMode
{
    D2D::FillMode get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometryGroup::GetSourceGeometryCount)</para>
/// </summary>
property UINT32 SourceGeometryCount
{
    UINT32 get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1GeometryGroup::GetSourceGeometries)</para>
/// </summary>
/// <returns>Geometry</returns>
ReadOnlyCollection<Geometry ^> ^
GetSourceGeometries(
    );

internal:

GeometryGroup();

GeometryGroup(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TransformedGeometry)</para>
///</summary>
public ref class TransformedGeometry : Geometry 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TransformedGeometry::GetSourceGeometry)</para>
/// </summary>
/// <returns>The Source Geometry.</returns>
Geometry ^
GetSourceGeometry(
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1TransformedGeometry::GetTransform)</para>
/// </summary>
property Matrix3x2F Transform
{
    Matrix3x2F get();
}

internal:

TransformedGeometry();

TransformedGeometry(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Mesh)</para>
///</summary>
public ref class Mesh : D2DResource 
{
public:

/// <summary>
/// Opens the mesh for population.
/// <para>(Also see DirectX SDK: ID2D1Mesh::Open)</para>
/// </summary>
/// <returns>TessellationSink</returns>
TessellationSink ^
Open(
    );

internal:

Mesh();

Mesh(
    IUnknown *pInner
    );

};

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Layer)</para>
///</summary>
public ref class Layer : D2DResource 
{
public:

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Layer::GetSize)</para>
/// </summary>
property SizeF Size
{
    SizeF get();
}

internal:

Layer();

Layer(
    IUnknown *pInner
    );

};

/// <summary>
/// The root factory interface for all of D2D's objects.
/// <para>(Also see DirectX SDK: ID2D1Factory)</para>
///</summary>
public ref class D2DFactory : DirectUnknown 
{
public:

/// <summary>
/// Cause the factory to refresh any system metrics that it might have been snapped on
/// factory creation.
/// <para>(Also see DirectX SDK: ID2D1Factory::ReloadSystemMetrics)</para>
/// </summary>
void
ReloadSystemMetrics(
    );

/// <summary>
/// Retrieves the current desktop DPI. To refresh this, call ReloadSystemMetrics.
/// <para>(Also see DirectX SDK: ID2D1Factory::GetDesktopDpi)</para>
/// </summary>
property DpiF DesktopDpi
{
    DpiF get();
}

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateRectangleGeometry)</para>
/// </summary>
/// <param name="rectangle">The rectangle parameter.</param>
/// <returns>RectangleGeometry</returns>
RectangleGeometry ^
CreateRectangleGeometry(
    RectF rectangle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateRoundedRectangleGeometry)</para>
/// </summary>
/// <param name="roundedRectangle">The roundedRectangle parameter.</param>
/// <returns>RoundedRectangleGeometry</returns>
RoundedRectangleGeometry ^
CreateRoundedRectangleGeometry(
    RoundedRect roundedRectangle
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateEllipseGeometry)</para>
/// </summary>
/// <param name="ellipse">The ellipse parameter.</param>
/// <returns>EllipseGeometry</returns>
EllipseGeometry ^
CreateEllipseGeometry(
    Ellipse ellipse
    );

/// <summary>
/// Create a geometry which holds other geometries.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateGeometryGroup)</para>
/// </summary>
/// <param name="fillMode">The fillMode parameter.</param>
/// <param name="geometries">The geometries parameter.</param>
/// <returns>GeometryGroup</returns>
GeometryGroup ^
CreateGeometryGroup(
    FillMode fillMode,
    IEnumerable<Geometry ^> ^ geometries
    );

/// <summary>
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateTransformedGeometry)</para>
/// </summary>
/// <param name="sourceGeometry">The sourceGeometry parameter.</param>
/// <param name="transform">The transform parameter.</param>
/// <returns>TransformedGeometry</returns>
TransformedGeometry ^
CreateTransformedGeometry(
    Geometry ^ sourceGeometry,
    Matrix3x2F transform
    );

/// <summary>
/// Returns an initially empty path geometry interface. A geometry sink is created off
/// the interface to populate it.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreatePathGeometry)</para>
/// </summary>
/// <returns>PathGeometry</returns>
PathGeometry ^
CreatePathGeometry(
    );

/// <summary>
/// Allows a non-default stroke style to be specified for a given geometry at draw time.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateStrokeStyle)</para>
/// </summary>
/// <param name="strokeStyleProperties">The strokeStyleProperties parameter.</param>
/// <param name="dashes">The dashes parameter.</param>
/// <returns>StrokeStyle</returns>
StrokeStyle ^
CreateStrokeStyle(
    StrokeStyleProperties strokeStyleProperties,
    cli::array<FLOAT> ^ dashes
    );

/// <summary>
/// Creates a render target which is a source of bitmaps.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateWicBitmapRenderTarget)</para>
/// </summary>
/// <param name="target">The target parameter.</param>
/// <param name="renderTargetProperties">The renderTargetProperties parameter.</param>
/// <returns>RenderTarget</returns>
RenderTarget ^
CreateWicBitmapRenderTarget(
    WICBitmap^ target,
    RenderTargetProperties renderTargetProperties
    );

/// <summary>
/// Creates a render target that appears on the display.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateHwndRenderTarget)</para>
/// </summary>
/// <param name="renderTargetProperties">The renderTargetProperties parameter.</param>
/// <param name="hwndRenderTargetProperties">The hwndRenderTargetProperties parameter.</param>
/// <returns>HwndRenderTarget</returns>
HwndRenderTarget ^
CreateHwndRenderTarget(
    RenderTargetProperties renderTargetProperties,
    HwndRenderTargetProperties hwndRenderTargetProperties
    );

/// <summary>
/// Creates a render target that draws to a DXGI Surface. The device that owns the surface
/// is used for rendering.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateDxgiSurfaceRenderTarget)</para>
/// </summary>
/// <param name="dxgiSurface">The dxgiSurface parameter.</param>
/// <param name="renderTargetProperties">The renderTargetProperties parameter.</param>
/// <returns>RenderTarget</returns>
RenderTarget ^
CreateDxgiSurfaceRenderTarget(
    Surface^ dxgiSurface,
    RenderTargetProperties renderTargetProperties
    );

/// <summary>
/// Creates a render target that draws to a GDI device context.
/// <para>(Also see DirectX SDK: ID2D1Factory::CreateDCRenderTarget)</para>
/// </summary>
/// <param name="renderTargetProperties">The renderTargetProperties parameter.</param>
/// <returns>DCRenderTarget</returns>
DCRenderTarget ^
CreateDCRenderTarget(
    RenderTargetProperties renderTargetProperties
    );

static D2DFactory^ CreateFactory();

static D2DFactory^ CreateFactory(
    D2DFactoryType factoryType
    );

static D2DFactory^ CreateFactory(
    D2DFactoryType factoryType,
    FactoryOptions factoryOptions
    );

DrawingStateBlock ^
CreateDrawingStateBlock(
    DrawingStateDescription drawingStateDescription,
    RenderingParams^ textRenderingParams
    );

DrawingStateBlock ^
CreateDrawingStateBlock(    
    );

internal:

D2DFactory();

D2DFactory(
    IUnknown *pInner
    );

};

} } } }

